home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / umich / utils / break.lzh / BREAK.TXT < prev   
Text File  |  1993-12-30  |  3KB  |  67 lines

  1. The following program, when placed in the AUTO folder or started by hand,
  2. lets you interrupt any program (except the desktop).
  3. This posting consists of a manual page and a uuencoded program.
  4. The corresponding source is sent to the moderator of comp.sources.atari.st.
  5.  
  6. For correspondence conceirning this program (bugs, questions etc.) try
  7.  
  8.       L. J. M. de Wit
  9.       Nachtegaallaan 7
  10.       5731XP Mierlo
  11.       Holland
  12.       e-mail: ..!mcvax!philmds!leo
  13.               (or perhaps  ..!hp4nl!philmds!leo)
  14.  
  15. ----------------------------- start of manual page ----------------------------
  16.   NAME
  17.      break - stop current program on receipt of interrupt character
  18.  
  19.   SYNTAX
  20.      break [-e|-d|-z] [-i|-c<code>]
  21.  
  22.   DESCRIPTION
  23.      After installing break, any program can be interrupted.
  24.      This is achieved by 'extending' the existing keyboard interrupt
  25.      routine: after executing the old code the break character check
  26.      is done.
  27.  
  28.      The various flags have the following meaning:
  29.         e(nable) : the current break character will end the program.
  30.                    the code returned is -32, what seems to be the standard
  31.                    value for programs interrupted by ^C in GEMDOS.
  32.         d(isable): no actions are done; this restores the old behaviour
  33.         z(ero)   : the current break character will be discarded (made 0)
  34.                    in the input buffer; this can be used to disable ^C.
  35.         i(nput)  : the break character is prompted for. Combinations with
  36.                    shift, control and alternate keys are also allowed.
  37.                    Useful for specifying the break character interactively.
  38.         c(ode)   : specifies the break character as a hexadecimal code.
  39.                    The hex code must follow the 'c' flag immediately.
  40.                    Useful for specifying the break character from a script.
  41.      Of the flags e,d and z only one should be used; e is the default.
  42.      Also, of the flags i and c only one should be used; control-delete is
  43.      the default. This is done on purpose; you can always change it to ^C
  44.      if you want to (or whatever key you like).
  45.       
  46.      The break program can be reused indefinitely, because a next invocation
  47.      is not made memory resident; it only modifies parameters in the first
  48.      invocation (the resident one).
  49.  
  50.      The program can be placed into the \AUTO folder to be installed
  51.      automatically, or activated 'by hand'. If placed in the \AUTO folder, it
  52.      should of course have a .PRG extension (break.prg); as \AUTO folder
  53.      programs don't get arguments, the break will be enabled and the break
  54.      character is control-delete in this case.
  55.  
  56.   BUGS/SHORTCOMINGS
  57.      A nice extension would be the possibility to catch the interrupt from
  58.      a user program; this could be achieved by using a new trap. As this
  59.      implies restoring the old interrupt catch routine when the program
  60.      exits, and maybe also core dumps could be added to the action of an
  61.      (other) interrupt character, such a more general signal mechanism is
  62.      not added (yet). Gives me time to think of a nice implementation 8-).
  63.  
  64.   JOKE
  65.      Gimme a break, huh?!
  66.  
  67.